package io;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @Author Justin Parker
 * @Date 2024/7/16 0016 11:30
 * @Version 1.0
 */
public class FileCopyDemo01 {
    public static void main(String[] args) throws IOException {

        FileInputStream fis = new FileInputStream("a.jpg");
        FileOutputStream fos = new FileOutputStream("b.jpg");

        int n =-1;
        while ((n=fis.read())!=-1 ){
            fos.write(n);
        }
        System.out.println("复制成功");
        fis.close();
        fos.close();
    }
}
